package cn.zktr.Personnel.model.service.tantiantian;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;

import cn.zktr.Personnel.model.dao.tantiantian.SlyPjtDao;
import cn.zktr.Personnel.model.dao.tantiantian.SlySetDao;
import cn.zktr.Personnel.model.mappers.tantiantian.SlySetMapper;
import cn.zktr.Personnel.model.pojos.PerSlyPjt;


@Service
@Transactional(rollbackOn=Exception.class)
public class SlyPjtService {
	
	/**
	 * 套帐项目
	 */
	@Autowired
	private SlyPjtDao pgtDao;
	/**
	 * 薪资套账
	 */
	@Autowired
	private SlySetDao setDao;
	@Autowired 
	private SlySetMapper setmer;
	
	/**
	 * @return 
	 * @return 套账项目查询所有
	 */
	public Iterable<PerSlyPjt> selectPgtAll() {
		return pgtDao.findAll();
	}
	/**
	 * @param rows 
	 * @param page 
	 * @return 薪资套账查询所有
	 */
	public Map<String,Object> selectSetAll() {
		Map<String,Object> maps = new HashMap<>();
		//页内容
		maps.put("total",setmer.selectpjts().size());
		maps.put("rows",setmer.selectpjts());
		return maps;
	}
	public List<PerSlyPjt> selectSetAlls() {
		return (List<PerSlyPjt>) pgtDao.findAll();
	}
}
